package xhwl.hmo.mall.bean;

import java.util.ArrayList;

/**
 * Created by admin on 2017-10-30.
 */

public class City {
    private String code;
    private String name;
    private ArrayList<Area> arealist=new ArrayList<>();
    public City(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public ArrayList<Area> getArealist() {
        return arealist;
    }

    public void setArealist(ArrayList<Area> arealist) {
        this.arealist = arealist;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj==this)
        {
            City other= (City) obj;
            if(code.equals(other.getCode())&&name.equals(other.getName()))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        return false;
    }
}
